<?php

namespace addons\tools\model;

use think\Model;

class UserVipRule extends Model
{
    protected $name = 'user_vip_rule';

    protected $autoWriteTimestamp = true;

    protected $append = [
        'tool_name',
    ];

    public function getToolNameAttr($value, $data)
    {
        return Tools::where('id', $data['tool_id'])->value('name');
    }
}